import React from 'react';
import ReactDOM from 'react-dom';
import './index.less';
import App from './App';
import * as serviceWorker from './serviceWorker';

ReactDOM.render(
  <div style={{width:"100%"}}>
    <App />
  </div>,
  document.getElementById('root')
);

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
// (function (doc, win) {
//   var docEl = doc.documentElement;
//   var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
//   var recalc = function () {
//     var clientWidth = window.innerWidth;
//     if (!clientWidth) return;
//     docEl.style.fontSize = 80 * (clientWidth / 1920) + 'px';
//   };

//   var getStyle = (obj, attr) => {
//     if (obj.currentStyle) {
//       return obj.currentStyle[attr];
//     } else {
//       return getComputedStyle(obj, "false")[attr];
//     }
//   }
//   if (!doc.addEventListener) return;
//   win.addEventListener(resizeEvt, recalc, false);
//   doc.addEventListener('DOMContentLoaded', recalc, false);
// }(document, window));
